package org.budo.support.dao;

import java.util.List;

import org.budo.support.dao.page.Page;

public interface IDao<Entity, Id> {
    public Boolean save(Entity entity);

    public Boolean saveIgnoreNull(Entity entity);

    public Id insert(Entity entity);

    public Id insertIgnoreNull(Entity entity);

    public Boolean saveBatch(List<Entity> list);

    public Id[] insertBatch(List<Entity> list);

    public Boolean update(Entity entity);

    public Boolean updateIgnoreNull(Entity entity);

    public Boolean deleteById(Id id);

    public Integer deleteByIds(Id[] ids);

    public Entity findById(Id id);

    public Entity findByExample(Entity example);

    public List<Entity> listByIds(Id[] ids);

    public List<Entity> list(Page page);
}